import * as API from './index'

export default {

  /*保存模型*/
  saveStory: params => {
    return API.POST(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/merge", params)
  },
  /**
   * 获取模型数量
   * @param params
   * @returns {*}
   */
  getStoryCount:params => {
    return API.GET(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/getCount", params)
  },

  /**
   * 分页查询
   * @param params
   * @returns {*}
   */
  queryByPage:params => {
    return API.POST(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/queryByPage", params)
  },
  /**
   * 删除模型
   * @param id
   * @returns {*}
   */
  deleteModel:id => {
    return API.DELETE(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/delete/"+id)
  },

  /**
   * 获取详细信息
   * @param id
   * @returns {*}
   */
  getDetailById:id => {
    return API.GET(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/detail/"+id)
  },
  /**
   * 开始任务
   * @param id
   * @returns {*}
   */
  startTask:id => {
    return API.POST(process.env.VUE_APP_REQUEST_URL_BASE+ "storyboard/api/v1/start/"+id)
  },
}
